home *** CD-ROM | disk | FTP | other *** search
- #ifndef RESOURCES_PCI_H
- #define RESOURCES_PCI_H 1
-
- /*
- ** $VER: micronik_pci.h 1.0 (22.12.9)
- **
- ** micronik_pci.resource include file
- **
- ** (C) Copyright 1997-1998 MicroniK
- ** All Rights Reserved
- **
- */
- #ifndef EXEC_TYPES_H
- #include "exec/types.h"
- #endif
-
-
- #include <exec/semaphores.h>
-
-
- #define PCIRESNAME "micronik_pci.resource"
-
- /* Structures used by the micronik_pci.resource */
-
- /* PCI spaces & flags */
-
- /* space - PCI IO Space */
- #define SPACE_IO 0
-
- /* space - PCI Memory Space */
- #define SPACE_MEMORY 1
-
-
- /* flags - PCI page can be shared with other processes */
- #define PCIF_SHARE 1
-
- /* flags - PCI page address can be changed using MovePCIPage */
- #define PCIF_MOVABLE 2
-
- /* flags - PCI page can use copy-back mode */
- #define PCIF_FIFO 4
-
-
- /* structure used to pass required PCI page parameters */
- struct PCIPage {
- ULONG address; /* whenever address is ULONG - this is PCI address */
- UBYTE sizebits; /* now many address bits inside page */
- /* all pages are aligned to their size */
- UBYTE space; /* which PCI address space (IO or MEMORY) */
- UBYTE flags; /* SHARE, MOVABLE */
- UBYTE pad1;
- };
-
- /* structure used to receive parameter of allocated PCI page */
- struct PCIDef {
- struct PCIPage def; /* PCI parameters of allocated window */
- APTR pcid_address; /* APTR - used to specify M68k address */
- /* M68k address of PCI window */
- };
-
- /* complex structure used to exchange information with pci.resource */
- struct PCIMapping {
- struct PCIPage request; /* required window parameters */
- struct PCIDef window; /* parameters of allocated window */
- APTR m68_address; /* M68k address of required PCI address */
- /* space - you size of PCI page */
- /* can be greater than required */
- ULONG reserved[6]; /* to internal use of resource */
- /* do not modify !!!! */
- };
-
- #endif /* RESOURCES_PCI_H */
-
-
-